<?php /* Smarty version Smarty-3.1.11, created on 2013-09-03 13:39:08
         compiled from "..\templates\tuyensinh\thutaichinh.tpl" */ ?>
<?php /*%%SmartyHeaderCode:222835216b7092f2037-93441553%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'dee7bf286f493362351d454b4565b8d5b362716f' => 
    array (
      0 => '..\\templates\\tuyensinh\\thutaichinh.tpl',
      1 => 1378190345,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '222835216b7092f2037-93441553',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_5216b709853f65_74842489',
  'variables' => 
  array (
    'dshoten' => 0,
    'dsmasv' => 0,
    'hoten' => 0,
    'masv' => 0,
    'loc' => 0,
    'nguoithu' => 0,
    'dssv' => 0,
    'i' => 0,
    'sv' => 0,
    'ten_cb' => 0,
    'ma_pq' => 0,
    'sotrang' => 0,
    'hientai' => 0,
    'url' => 0,
    'SL_hien' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5216b709853f65_74842489')) {function content_5216b709853f65_74842489($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'C:\\xampp\\htdocs\\tuyensinh\\lib\\smarty\\plugins\\modifier.date_format.php';
?><script>
function ktcheck1(a){
        chktt2=document.getElementById("tt2"+a);
        chktt2.checked=false;
}
function ktcheck2(a){
        chktt1=document.getElementById("tt1"+a);
        chktt1.checked=false;
}
function xoahoadon(a){
    id=document.getElementById("masv_tt"+a).value;
    if(confirm("Xóa hóa đơn SV"+id)) 
        window.location.href="index.php?muc=tuyensinh&modul=thutaichinh&xoahd="+id;
}
function tailaitrang(a,trangthai){
    tongtien_in=document.getElementById("tongtien_in");
    tongtien=tongtien_in.value;
    if(trangthai=='2'){
        tongtiencu=document.getElementById("tongtiencu"+a);
        tongtien_cu=tongtiencu.value;
        if(tongtien==tongtien_cu){
            if(confirm("IN lại hóa đơn cũ số tiền: "+tongtien)){
                trangin=document.getElementById("trangin");
                linkthu=document.getElementById("thu"+a);
                linkthu.target="_blank";
                linkthu.href=trangin.value                        
                window.location.href="index.php?muc=tuyensinh&modul=thutaichinh";        
            }
        }else{
            if(confirm("Chỉnh sửa hóa đơn từ "+tongtien_cu+" Thành "+tongtien+". Cấp lại số hóa đơn")){
                trangin=document.getElementById("trangin");
                linkthu=document.getElementById("thu"+a);
                linkthu.target="_blank";
                linkthu.href=trangin.value                        
                window.location.href="index.php?muc=tuyensinh&modul=thutaichinh";        
            }
        }
    }else{
            trangin=document.getElementById("trangin");
            linkthu=document.getElementById("thu"+a);
            linkthu.target="_blank";
            linkthu.href=trangin.value                        
            setTimeout(window.location.href="index.php?muc=tuyensinh&modul=thutaichinh",2000);
    }
}
function ktsotien(){
      tongtien_in=document.getElementById("tongtien_in");
      alert("Số tiền cần đóng là: "+tongtien_in.value);
}      
function luutaichinh(a){   
         id=document.getElementById("masv_tt"+a).value;
         sk=document.getElementById("sk"+a);
         tt1=document.getElementById("tt1"+a);
         tt2=document.getElementById("tt2"+a);
         the=document.getElementById("the"+a);
         yt=document.getElementById("yt"+a);
         trangin=document.getElementById("trangin");         
         tongtien_in=document.getElementById("tongtien_in");
         nguoithutien=document.getElementById("nguoithutien");
         nguoithu=nguoithutien.value;
         
         
         url="tuyensinh/hoadon.php?id="+id;
         url=url+"&hp";
         tongtien=3000000;
         if(yt.checked) {
           url=url+"&yt";
           tongtien=tongtien+289800;
          }                      
         if(sk.checked) {
            url=url+"&sk";
            tongtien=tongtien+125000;
          }    
         if(tt1.checked){
            url=url+"&tt1";
            tongtien=tongtien+170000;
          }    
         if(tt2.checked){
            url=url+"&tt2";
            tongtien=tongtien+200000;
          }   
         if(the.checked){
            url=url+"&the";
            tongtien=tongtien+200000;
         }
         url=url+"&nguoithu="+nguoithu;     
      trangin.value=url;
      tongtien_in.value=tongtien;
    }
    $(function() {
    var availableTags = [<?php echo $_smarty_tpl->tpl_vars['dshoten']->value;?>
 ];
    $( "#hoten" ).autocomplete({
      source: availableTags
    });
  });
  $(function() {
    var availableTags = [<?php echo $_smarty_tpl->tpl_vars['dsmasv']->value;?>
 ];
    $( "#masv" ).autocomplete({
      source: availableTags
    });
  });
  function locdl(){
        var url="index.php?muc=tuyensinh&modul=thutaichinh";
        hoten=document.getElementById('hoten').value;
        masv=document.getElementById('masv').value;
        all=document.getElementById('loc_all');
        chuain=document.getElementById('loc_chuain');
        dain=document.getElementById('loc_dain');
        toiin=document.getElementById('loc_toiin');
        if(hoten!="") {
            url=url+"&hoten="+hoten;
          }
        if(masv!="") {
            url=url+"&masv="+masv;
          }  
        if(all.checked) {
            url=url+"&loc=0";
          }
        if(chuain.checked) {
            url=url+"&loc=1";
          }
        if(dain.checked) {
            url=url+"&loc=2";
          }  
        if(toiin.checked) {
            url=url+"&loc=3";
          }      
    window.location.href=url;
    }
</script>
<div class="content-box"><!-- Start Content Box -->
	<div class="content-box-header">
		<h3>Danh sách sinh viên nhập học (Hồ sơ đã được duyệt/cấp mã)</h3>
	</div> <!-- End .content-box-header -->
	
	<div class="content-box-content">
<!----------------------------------------------------------------- NỘI DUNG TRANG------------------------------------------------------------------------>
        <form action="tuyensinh/xuatfiledsnhaphoc.php" method="POST" id="dssv">
        <table>
            <tr class="linebottom">
                <td>&nbsp;&nbsp;&nbsp;
                    <b>1.</b> Học phí(3.000.000 đ/SV)&nbsp;  
                    <b>2.</b> BH Y tế(289.800 đ/SV)&nbsp;
                    <b>3.</b> Khám sức khỏe(125.000 đ/SV)&nbsp;
                    <b>4.</b> Thẻ thư viện(200.000 đ/SV)&nbsp; 
                    <b>5.</b> BH thân thể(170.000 hoặc 200.000 đ/SV)&nbsp;                     
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <b>Họ tên SV </b> <input type="text" class="text-input" name="hotensv" id="hoten" placeholder="Họ tên sinh viên" value="<?php echo $_smarty_tpl->tpl_vars['hoten']->value;?>
"/>
                    <b>Mã SV </b><input type="text" class="text-input" name="masv" id="masv" placeholder="Mã sinh viên" value="<?php echo $_smarty_tpl->tpl_vars['masv']->value;?>
"/>
                    <input type="button" class="button" value="Lọc DL" onclick="locdl();" />
                <b>Hiển thị: </b>
                    <input type="radio" name="hienthi" id="loc_all"     value="0"    onclick="locdl();" <?php if ($_smarty_tpl->tpl_vars['loc']->value==0){?> checked=""<?php }?>/>Tất cả
                    <input type="radio" name="hienthi" id="loc_chuain"  value="1"    onclick="locdl();" <?php if ($_smarty_tpl->tpl_vars['loc']->value==1){?> checked=""<?php }?>/>HĐ chưa in
                    <input type="radio" name="hienthi" id="loc_dain"    value="2"    onclick="locdl();" <?php if ($_smarty_tpl->tpl_vars['loc']->value==2){?> checked=""<?php }?>/>HĐ đã in
                    <input type="radio" name="hienthi" id="loc_toiin"   value="3"    onclick="locdl();" <?php if ($_smarty_tpl->tpl_vars['loc']->value==3){?> checked=""<?php }?>/>Tôi đã in
                    <input type="text" name="nguoithutien" id="nguoithutien" class="text-input" value="<?php echo $_smarty_tpl->tpl_vars['nguoithu']->value;?>
"/>
                </td>
            </tr>
        </table><br />

 <!------------------------------------------------------------------------------------------------------------------------------------------------------->       
        <table>
            <tr class="linebottom">
                <td class="td-90">Mã sinh viên</td>
                <td class="td-150">Họ tên sinh viên</td>
                <td class="td-30">GT</td>
                <td class="td-70">Ngày sinh</td>
                <td class="td-180">Ngành học</td>
                <td class="td-30 cangiua">HP</td>
                <td class="td-30 cangiua">BHYT</td>
                <td class="td-30 cangiua">KSK</td>
                <td class="td-30 cangiua">TTV</td>
                <td class="td-30 cangiua">TT1</td>
                <td class="td-30 cangiua">TT2</td>
                <td class="td-150 cangiua">Người lập hóa đơn</td>                                
                <td class="td-80 cangiua">Hóa đơn</td>
            </tr>
            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(0, null, 0);?>
            <?php  $_smarty_tpl->tpl_vars['sv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['sv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['dssv']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['sv']->key => $_smarty_tpl->tpl_vars['sv']->value){
$_smarty_tpl->tpl_vars['sv']->_loop = true;
?>
            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                <tr class="linebottom">
                    <td>
                        <a href="index.php?muc=tuyensinh&modul=xemchitiet_tuyensinh&idsv=<?php echo $_smarty_tpl->tpl_vars['sv']->value['sbd_tt'];?>
"><?php echo $_smarty_tpl->tpl_vars['sv']->value['masv_tt'];?>
</a>
                        <input type="hidden" id="masv_tt<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['sv']->value['masv_tt'];?>
"/>
                    </td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sv']->value['hoten_tt'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sv']->value['gioitinh_tt'];?>
</td>
                    <td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['sv']->value['ngaysinh_tt'],'%d/%m/%Y');?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sv']->value['nganh_tt'];?>
</td>
                    <td class="cangiua">
                        <input type="checkbox" checked="" disabled="true"/>
                    </td>
                    <?php if ($_smarty_tpl->tpl_vars['sv']->value['trangthai_tt']=='2'){?>
                        <?php if ($_smarty_tpl->tpl_vars['ten_cb']->value==$_smarty_tpl->tpl_vars['sv']->value['nguoithu_tt']||$_smarty_tpl->tpl_vars['ma_pq']->value=='admin'){?>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['yt']==1){?> checked=""  <?php }?> id="yt<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/></td>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['sk']==1){?> checked=""  <?php }?> id="sk<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/></td>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['the']==1){?> checked="" <?php }?> id="the<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/></td>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['tt1']==1){?> checked="" <?php }?> id="tt1<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" onclick="ktcheck1(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
);" /></td>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['tt2']==1){?> checked="" <?php }?> id="tt2<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" onclick="ktcheck2(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
);"/></td>
                            <td><?php echo $_smarty_tpl->tpl_vars['sv']->value['nguoithu_tt'];?>
 (<?php echo $_smarty_tpl->tpl_vars['sv']->value['sohd_tt'];?>
)<input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['sv']->value['tongtien_tt'];?>
" id="tongtiencu<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/></td>
                            <td class="cantrai">
                                <a href="#" id="thu<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" onmousemove="luutaichinh(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
);"><input class="button" type="button" value="In" onclick="tailaitrang(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
,2);"/></a>
                                <img src="images/ok.gif" title="Đã in hóa đơn này" onmousemove="luutaichinh(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
);" onclick="ktsotien();"/>
                                <?php if ($_smarty_tpl->tpl_vars['ma_pq']->value=='admin'){?>
                                    <img src="images/Cancel.gif" title="Hủy hóa đơn" width="15px" height="15px" onclick="xoahoadon(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
)" />
                                <?php }?>
                         <?php }else{ ?>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['yt']==1){?>  checked="" <?php }?> disabled="true" /></td>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['sk']==1){?>  checked="" <?php }?> disabled="true" /></td>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['the']==1){?> checked="" <?php }?> disabled="true" /></td>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['tt1']==1){?> checked="" <?php }?> disabled="true" /></td>
                            <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['tt2']==1){?> checked="" <?php }?> disabled="true" /></td>
                            <td><?php echo $_smarty_tpl->tpl_vars['sv']->value['nguoithu_tt'];?>
</td>
                            <td class="cangiua">&nbsp;&nbsp;<img src="images/ok.gif" title="Đã in hóa đơn này"/></td>
                         <?php }?>
                    <?php }else{ ?>
                        <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['yt']==1){?> checked=""  <?php }?> id="yt<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/></td>      
                        <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['sk']==1){?> checked=""  <?php }?> id="sk<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/></td>
                        <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['the']==1){?> checked="" <?php }?> id="the<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/></td>
                        <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['tt1']==1){?> checked="" <?php }?> id="tt1<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" onclick="ktcheck1(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
);" /></td>
                        <td class="cangiua"><input type="checkbox"  <?php if ($_smarty_tpl->tpl_vars['sv']->value['tt2']==1){?> checked="" <?php }?> id="tt2<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" onclick="ktcheck2(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
);"/></td>
                        <td><?php echo $_smarty_tpl->tpl_vars['sv']->value['nguoithu_tt'];?>
</td>              
                        <td><a href="#" id="thu<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" onmousemove="luutaichinh(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
);"><input class="button" type="button" value="In" onclick="tailaitrang(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
,1);" /></a>
                            <img src="images/Print.ico" title="Chưa in hóa đơn này" onmousemove="luutaichinh(<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
);" onclick="ktsotien();"/>
                        </td>                        
                        <?php }?>
                    </td>                    
                </tr>
            <?php } ?>
            <tr><td colspan="19"><input type="hidden" id="trangin" value="" /><input type="hidden" id="tongtien_in" value="" /></td></tr>            
        <!---------------------------------------------------------phân trang--------------------------------------------------------->
        <?php if ($_smarty_tpl->tpl_vars['sotrang']->value>1){?>    
            <tr>
                <td colspan="11">
                    <?php  $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['i']->value = 1;
  if ($_smarty_tpl->tpl_vars['i']->value<=$_smarty_tpl->tpl_vars['sotrang']->value){ for ($_foo=true;$_smarty_tpl->tpl_vars['i']->value<=$_smarty_tpl->tpl_vars['sotrang']->value; $_smarty_tpl->tpl_vars['i']->value++){
?>
                        <?php if ($_smarty_tpl->tpl_vars['i']->value!=$_smarty_tpl->tpl_vars['hientai']->value){?>
                            <a href="<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
&batdau=<?php echo $_smarty_tpl->tpl_vars['SL_hien']->value*($_smarty_tpl->tpl_vars['i']->value-1);?>
">|<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
|</a>
                        <?php }else{ ?>
                            <font color=red>|<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
|</font>
                        <?php }?>    
                    <?php }} ?>
                </td>
            </tr>
        <?php }?>    
        </table>
    </form>  
<!-----------------------------------------------------------KẾT THÚC NỘI DUNG TRANG------------------------------------------------------------------------>
</div> <!-- End .content-box-content -->
</div> <!-- End .content-box --><?php }} ?>